@import url(https://fonts.googleapis.com/css?family=Open+Sans:600,400);
.frame {
  position: absolute;
  width: 400px;
  height: 400px;
  inset: 0;
  margin: auto;
  border-radius: 2px;
  box-shadow: 1px 2px 10px rgba(0, 0, 0, 0.3);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  overflow: hidden;
  background-color: #c7d6ee;
}

.card {
  position: absolute;
  width: 240px;
  height: 150px;
  z-index: 0;
  background-color: #fff;
  inset: 0;
  margin: auto;
  border-radius: 3px;
  box-shadow: 4px 8px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.5);
}
.card.active {
  pointer-events: all;
  z-index: 1;
  animation: fadeIn 0.6s ease-in-out both 0.5s;
}
.card.inactive {
  z-index: 2;
  animation: fadeOut 0.6s ease-in-out both;
}
.card .number-bg {
  position: absolute;
  width: 60px;
  height: 60px;
  top: -30px;
  right: -30px;
  transform: rotate(45deg);
  background-color: #8391a1;
}
.card .number {
  position: absolute;
  top: 6px;
  right: 8px;
  color: #fff;
  line-height: 13px;
  font-size: 13px;
  font-weight: 600;
}
.card .text {
  text-align: center;
  padding: 20px 10px;
}
.card .text .headline {
  display: block;
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
  color: #616e7d;
  margin-bottom: 8px;
}
.card .text p {
  font-size: 12px;
  line-height: 17px;
  color: #8391a1;
  margin: 0;
}
.card .button {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  height: 40px;
  background-color: #3ca7fb;
  color: #fff;
  text-transform: uppercase;
  line-height: 40px;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}
.card .button:hover {
  background-color: #2196f3;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(1.15);
  }
}